package com.cxhc.system.service.app.impl;

import java.util.List;
import com.cxhc.common.utils.DateUtils;
import com.cxhc.system.domain.app.RpCallPolice;
import com.cxhc.system.mapper.app.RpCallPoliceMapper;
import com.cxhc.system.service.app.IRpCallPoliceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 微报警Service业务层处理
 * 
 * @author Dhq
 * @date 2024-09-23
 */
@Service
public class RpCallPoliceServiceImpl implements IRpCallPoliceService
{
    @Autowired
    private RpCallPoliceMapper rpCallPoliceMapper;

    /**
     * 查询微报警
     * 
     * @param id 微报警主键
     * @return 微报警
     */
    @Override
    public RpCallPolice selectRpCallPoliceById(Long id)
    {
        return rpCallPoliceMapper.selectRpCallPoliceById(id);
    }

    /**
     * 查询微报警列表
     * 
     * @param rpCallPolice 微报警
     * @return 微报警
     */
    @Override
    public List<RpCallPolice> selectRpCallPoliceList(RpCallPolice rpCallPolice)
    {
        return rpCallPoliceMapper.selectRpCallPoliceList(rpCallPolice);
    }

    /**
     * 新增微报警
     * 
     * @param rpCallPolice 微报警
     * @return 结果
     */
    @Override
    public int insertRpCallPolice(RpCallPolice rpCallPolice)
    {
        return rpCallPoliceMapper.insertRpCallPolice(rpCallPolice);
    }

    /**
     * 修改微报警
     * 
     * @param rpCallPolice 微报警
     * @return 结果
     */
    @Override
    public int updateRpCallPolice(RpCallPolice rpCallPolice)
    {
        rpCallPolice.setUpdateTime(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS));
        return rpCallPoliceMapper.updateRpCallPolice(rpCallPolice);
    }

    /**
     * 批量删除微报警
     * 
     * @param ids 需要删除的微报警主键
     * @return 结果
     */
    @Override
    public int deleteRpCallPoliceByIds(Long[] ids)
    {
        return rpCallPoliceMapper.deleteRpCallPoliceByIds(ids);
    }

    /**
     * 删除微报警信息
     * 
     * @param id 微报警主键
     * @return 结果
     */
    @Override
    public int deleteRpCallPoliceById(Long id)
    {
        return rpCallPoliceMapper.deleteRpCallPoliceById(id);
    }
}
